﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SAR
{
    public partial class ShuChuJieGuo:BasePageClass
    {

        public ShuChuJieGuo()
        {
            this.InitializeComponent();
            this.ChartGrid.Visibility = Visibility.Visible;
            this.TableGrid.Visibility = Visibility.Hidden;
        }
        public bool PreClick()
        {


            return true;
        }

        public bool NextClick()
        {
           
            return true;
        }

        private void SARTable1Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (this.SARTable1Head.SARIsUnfolded)
            {
                this.SARTable1Head.SARIsUnfolded = false;
                this.SARTable1.Visibility = Visibility.Collapsed;
                if (this.SARTable2Head.SARIsUnfolded)
                {
                    this.SARTable2.Visibility = Visibility.Visible;
                }
            }else
            {
                this.SARTable1Head.SARIsUnfolded = true;
                this.SARTable1.Visibility = Visibility.Visible;
                this.SARTable2.Visibility = Visibility.Collapsed;
            }
            
        }

        private void SARTable2Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (this.SARTable2Head.SARIsUnfolded)
            {
                this.SARTable2Head.SARIsUnfolded = false;
                this.SARTable2.Visibility = Visibility.Collapsed;
                if (this.SARTable1Head.SARIsUnfolded)
                {
                    this.SARTable1.Visibility = Visibility.Visible;
                }
            }
            else
            {
                this.SARTable2Head.SARIsUnfolded = true;
                this.SARTable2.Visibility = Visibility.Visible;
                this.SARTable1.Visibility = Visibility.Collapsed;
            }
        }

        private void sARResultMenuBar_SARMenuClick(int menuItemIndex)
        {
            if (menuItemIndex == 3)
            {
                this.TableGrid.Visibility = Visibility.Visible;
                this.ChartGrid.Visibility = Visibility.Hidden;
            }else
            {
                this.ChartGrid.Visibility = Visibility.Visible;
                this.TableGrid.Visibility = Visibility.Hidden;
            }
        }
    }
}